Optimal. Leaf size=49 \[ \frac {b}{2 a^2 d \left (a \cosh ^2(c+d x)+b\right )}+\frac {\log \left (a \cosh ^2(c+d x)+b\right )}{2 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4138, 266, 43} \[ \frac {b}{2 a^2 d \left (a \cosh ^2(c+d x)+b\right )}+\frac {\log \left (a \cosh ^2(c+d x)+b\right )}{2 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 266
Rule 4138
Rubi steps
\begin {align*} \int \frac {\tanh (c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^3}{\left (b+a x^2\right )^2} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {x}{(b+a x)^2} \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-\frac {b}{a (b+a x)^2}+\frac {1}{a (b+a x)}\right ) \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {b}{2 a^2 d \left (b+a \cosh ^2(c+d x)\right )}+\frac {\log \left (b+a \cosh ^2(c+d x)\right )}{2 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.59, size = 79, normalized size = 1.61 \[ \frac {(a+2 b) \log (a \cosh (2 (c+d x))+a+2 b)+a \cosh (2 (c+d x)) \log (a \cosh (2 (c+d x))+a+2 b)+2 b}{2 a^2 d (a \cosh (2 (c+d x))+a+2 b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 476, normalized size = 9.71 \[ -\frac {2 \, a d x \cosh \left (d x + c\right )^{4} + 8 \, a d x \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + 2 \, a d x \sinh \left (d x + c\right )^{4} + 2 \, a d x + 4 \, {\left ({\left (a + 2 \, b\right )} d x - b\right )} \cosh \left (d x + c\right )^{2} + 4 \, {\left (3 \, a d x \cosh \left (d x + c\right )^{2} + {\left (a + 2 \, b\right )} d x - b\right )} \sinh \left (d x + c\right )^{2} - {\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, {\left (a + 2 \, b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a + 2 \, b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + {\left (a + 2 \, b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\frac {2 \, {\left (a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} + a + 2 \, b\right )}}{\cosh \left (d x + c\right )^{2} - 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2}}\right ) + 8 \, {\left (a d x \cosh \left (d x + c\right )^{3} + {\left ({\left (a + 2 \, b\right )} d x - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{2 \, {\left (a^{3} d \cosh \left (d x + c\right )^{4} + 4 \, a^{3} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a^{3} d \sinh \left (d x + c\right )^{4} + a^{3} d + 2 \, {\left (a^{3} + 2 \, a^{2} b\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a^{3} d \cosh \left (d x + c\right )^{2} + {\left (a^{3} + 2 \, a^{2} b\right )} d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a^{3} d \cosh \left (d x + c\right )^{3} + {\left (a^{3} + 2 \, a^{2} b\right )} d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.42, size = 121, normalized size = 2.47 \[ -\frac {\frac {2 \, d x}{a^{2}} + \frac {e^{\left (4 \, d x + 4 \, c\right )} + 2 \, e^{\left (2 \, d x + 2 \, c\right )} + 1}{{\left (a e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )} a} - \frac {\log \left (a e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )}{a^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 60, normalized size = 1.22 \[ \frac {\ln \left (a +b \mathrm {sech}\left (d x +c \right )^{2}\right )}{2 d \,a^{2}}-\frac {1}{2 d a \left (a +b \mathrm {sech}\left (d x +c \right )^{2}\right )}-\frac {\ln \left (\mathrm {sech}\left (d x +c \right )\right )}{d \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 106, normalized size = 2.16 \[ \frac {2 \, b e^{\left (-2 \, d x - 2 \, c\right )}}{{\left (a^{3} e^{\left (-4 \, d x - 4 \, c\right )} + a^{3} + 2 \, {\left (a^{3} + 2 \, a^{2} b\right )} e^{\left (-2 \, d x - 2 \, c\right )}\right )} d} + \frac {d x + c}{a^{2} d} + \frac {\log \left (2 \, {\left (a + 2 \, b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a e^{\left (-4 \, d x - 4 \, c\right )} + a\right )}{2 \, a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.73, size = 53, normalized size = 1.08 \[ \frac {\ln \left ({\mathrm {cosh}\left (c+d\,x\right )}^2\,\left (a+\frac {b}{{\mathrm {cosh}\left (c+d\,x\right )}^2}\right )\right )}{2\,a^2\,d}-\frac {1}{2\,a\,d\,\left (a+\frac {b}{{\mathrm {cosh}\left (c+d\,x\right )}^2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________